LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := libffmpegextractor
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_MODULE_TAGS := optional

LOCAL_C_INCLUDES := \
system/media/audio/include \
frameworks/native/include/media/openmax \
frameworks/av/include \
frameworks/av/media/libstagefright \
hardware/qcom/media/mm-core \
frameworks/av/media/libstagefright/include \
frameworks/av/media/ndk/include

LOCAL_EXPORT_C_INCLUDE_DIRS := \
  $(LOCAL_PATH)/media_ndk_headers

LOCAL_HEADER_LIBRARIES := \
  media_ndk_headers \
  libstagefright_headers

LOCAL_SRC_FILES := \
  FFmpegExtractor.cpp \
  ffmpeg_source.cpp \
  ffmpeg_utils.cpp \
  ffmpeg_cmdutils.c \
  codec_utils.cpp

LOCAL_CFLAGS := -Wall -fvisibility=hidden -Wno-unused-parameter -Wno-unused-const-variable
LOCAL_CFLAGS += -DTARGET_CONFIG=\"config-$(TARGET_ARCH_VARIANT).h\"

LOCAL_SHARED_LIBRARIES := \
  libutils \
  libcutils \
  libstagefright_foundation \
  liblog \
  libmediandk \
  libbinder_ndk \
  libswresample \
  libswscale \
  libavcodec \
  libavutil \
  libavformat \
  libdl

LOCAL_STATIC_LIBRARIES := libstagefright_metadatautils

LOCAL_LDLIBS := -lm

LOCAL_MODULE_RELATIVE_PATH := extractors

include $(BUILD_SHARED_LIBRARY)
include $(call all-makefiles-under,$(LOCAL_PATH))